home *** CD-ROM | disk | FTP | other *** search
- /*================================================================================
- dialogUtilities.h
-
- circa 1991 by Greg Anderson
- greggor@apple.com
-
- FREE DISTRIBUTION--use and enjoy
-
- This file contains various and sundry dialog box utility routines
- ================================================================================*/
- #ifndef __DIALOGUTILITIES__
- #define __DIALOGUTILITIES__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __DIALOGS__
- #include <Dialogs.h>
- #endif
-
- /*
- // This is the structure of an item in a dialog item list.
- // See IM I-427 for an explanation of the complete format
- // of a DITL
- */
- typedef struct
- {
- long placeholder;
- Rect location;
- unsigned char itemType;
- unsigned char extraLength;
- } DITLitem;
-
- /*
- // Prototypes for dialogUtilities.c
- */
- void MessageBox( Str255 pstr );
- void CenterAndShowDialog(DialogPtr dlog);
- short AddNewUserItem( DialogPtr dlog );
- pascal void DrawDottedLineProc(DialogPtr dlog, short item);
- void SetUserItemToDottedLine( DialogPtr dlog, short whichItem );
- pascal void DrawFrameRectProc(DialogPtr dlog, short item);
- void SetUserItemToFrameRect( DialogPtr dlog, short whichItem );
- pascal void DrawDefaultProc(DialogPtr dlog, short item);
- short InstallDefaultOutline(DialogPtr dlog, short button);
- pascal void DrawActiveItemProc(DialogPtr dlog, short item);
- short InstallActiveItemOutline(DialogPtr dlog, short button);
- void MoveOutline(DialogPtr dlog, short userItem, short button);
- void MoveActiveIndicator(DialogPtr dlog, short userItem, short button);
- void MoveDItem( DialogPtr dlog, short itemNumber, short h, short v );
- void SetItemHandle( DialogPtr dlog, short whichItem, Handle newItem );
- Point GetItemPoint( DialogPtr dlog, short itemNum );
- Boolean ButtonEnabled(DialogPtr dlog, short item);
- pascal void EnableButton(DialogPtr dlog, short button,Boolean enable);
- void FlashDlogItem( DialogPtr dlog, short itemNum );
- pascal Boolean CutPasteFilter( DialogPtr dlog, EventRecord* event, short* item );
-
- #endif
-